package com.sbxBase.controller;

import com.sbxBase.service.RouteService;
import com.common.entity.Result;
import com.common.entity.sbxBase.Route;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/routeCommon")
@Api(tags = "路由管理")
public class RouteCommonController {
    @Resource
    private RouteService routeService;

    @GetMapping
    @ApiOperation("查询")
    public Result getPath() {
        List<Route> path = routeService.getRouterByRoleId();
        return Result.success(path);
    }

}
